Add benchmark for ls_cmd using a ext4 test image of around 1000 files#1622
Add benchmark for ls_cmd using a ext4 test image of around 1000 files#1622
ls_cmd using a ext4 test image of around 1000 files#1622Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #1622 +/- ##
=======================================
Coverage 81.09% 81.09%
=======================================
Files 402 402
Lines 35264 35264
=======================================
Hits 28599 28599
Misses 6665 6665
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Merging this PR will not alter performance
Performance Changes
Comparing |
b8d3a1f to
1b6be8a
Compare
8ab4b02 to
f939c33
Compare
9499734 to
9bae921
Compare
| The /bin files are all sparse (filled with zeros). | ||
| The files in /etc do contain data. |
There was a problem hiding this comment.
Can you just shortly describe how you created this test image? At some point in the future we might want to put it into a (reproducible) script but for now having a description of the process would be nice already.
There was a problem hiding this comment.
I pushed my notes. The python script to recreate the sparse files from walkfs input is not included. But that is implementation details, anyone could still reproduce it.
There was a problem hiding this comment.
Note that it's impossible to preserve the st_birthtime and st_ctime stamps using os.utime().
1411df3 to
af2224f
Compare
2e8c03a to
b08cff4
Compare
This PR adds a benchmark test for the
ls_cmdintarget-shelland a new test fixture providing an ext4 image with around 1000 files for doing the directory listing.The benchmark is in preparation of implementing #1577 and some other related issues, which will contain some refactoring regarding efficiency.
The test image is derived from
debian-live-13.3.0-amd64-standard.isoand only the/bindir and some files from/etcare copied over. The file contents in/binare also all sparse (NULL bytes) so the image compresses well. The test data mainly focuses on what is useful for directory listings, such as filenames, permissions, owner and group.The compressed test image itself is only 100kb.